Do the magellan cache icon thing for mapsend, too. (Why didn't I commit
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 18 Aug 2003 18:09:22 +0000 (18:09 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 18 Aug 2003 18:09:22 +0000 (18:09 +0000)
this a year ago?)

gpsbabel/mapsend.c

index eb89e72c67b0c582214c823936a0d58699e81ab1..d1aafdc7dfde7b347d48e544ba703bcfbe3e68e9 100644 (file)
@@ -396,7 +396,7 @@ mapsend_waypt_pr(const waypoint *waypointp)
        double flong;
        double flat;
        static int cnt = 0;
-       const char *iconp;
+       const char *iconp = NULL;
        const char *sn = global_opts.synthesize_shortnames ? 
                mkshort(mkshort_handle, waypointp->description) :
                waypointp->shortname;
@@ -428,6 +428,15 @@ mapsend_waypt_pr(const waypoint *waypointp)
        } else  {
                c = 0;
        }
+       if (get_cache_icon(waypointp)) {
+               iconp = mag_find_token_from_descr(get_cache_icon(waypointp));
+               if (1 == strlen(iconp)) {
+                       c = iconp[0] - 'a';
+               } else {
+                       c = iconp[1] - 'a' + 26;
+               }
+       }
+
        fwrite(&c, 1, 1, mapsend_file_out);
        c = 1;
        fwrite(&c, 1, 1, mapsend_file_out);